package com.kingmed.kmss.common.exception;

import com.kingmed.kmss.common.enums.base.code.IResultCode;

/**
 * 忽略异常
 * @author liangzhi
 * @date 2023/9/18
 */
public class IgnoreException extends RuntimeException{

    private IResultCode resultCode;


    public IgnoreException(IResultCode resultCode) {
        super(resultCode.getMessage());
        this.resultCode = resultCode;
    }

    public IgnoreException(String message) {
        super(message);
    }

    public IgnoreException(String format, Object... args) {
        super(String.format(format, args));
    }

    public IgnoreException(Throwable cause) {
        super(cause);
    }

    public IgnoreException(String message, Throwable cause) {
        super(message, cause);
    }

    public IResultCode getErrorCode() {
        return resultCode;
    }
}
